<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /*   var a2 = ['张晓璞', '姚雨薇', '余程', '李雨涵', '川普'];
      for (a1 = 0; a1 <= 4; a1++) {
        console.log(a2[a1]);
      } */

      //利用循环和他的长度打印全部数组
      var a2 = ['张晓璞', '姚雨薇', '余程', '李雨涵', '川普', 'a', 'b'];
      for (i = 0; i < a2.length; i++) {
        console.log(a2[i]);
      }
    </script>
  </body>
</html>
